﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WS.BLL
{
    public class DanhmucBLL : WS.DAL.DanhmucDAL
    {
        public string Layma(string Loai)
        {
            var tb = base.Layma(Loai);
            var m = "0";

            if (tb != null && tb.Rows.Count > 0)
                m = tb.Rows[0]["Ma"].ToString().Substring(Loai.Length) + "";

            var x = Convert.ToInt32(m);
            x++;

            m = x.ToString("00#");
            return Loai + m;
        }

    }
}